package com.chj.comp.common.auth.service.impl;

import com.chj.comp.common.auth.entity.SysPermission;
import com.chj.comp.common.auth.mapper.SysPermissionMapper;
import com.chj.comp.common.auth.service.ISysPermissionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author cuihui
 * @since 2022-02-15
 */
@Service
public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, SysPermission> implements ISysPermissionService {

    @Autowired
    private SysPermissionMapper sysPermissionMapper;

    @Override
    public List<SysPermission> getPermissionsByUserId(Integer userId){
        return sysPermissionMapper.selectPermissionsByUserId(userId);
    }
}
